package com.jacky.po;

import java.util.Objects;

/**
 * @Description: 用户实体类
 * @author: Jacky
 * @date: 2021.10.12
 */
public abstract class AbstractUser {
    private String id;
    private String createTime;
    private String updateTime;
    private String name;
    private String password;
    private String identity;


    public AbstractUser(String name, String password, String identity) {
        this.name = name;
        this.password = password;
        this.identity = identity;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = this.createTime;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = this.updateTime;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getIdentity() {
        return identity;
    }

    public void setIdentity(String identity) {
        this.identity = identity;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {return true;}
        if (o == null || getClass() != o.getClass()) {return false;}
        AbstractUser that = (AbstractUser) o;
        return Objects.equals(id, that.id) && Objects.equals(createTime, that.createTime) && Objects.equals(updateTime, that.updateTime) && Objects.equals(name, that.name) && Objects.equals(password, that.password) && Objects.equals(identity, that.identity);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, createTime, updateTime, name, password, identity);
    }

    @Override
    public String toString() {
        return "AbstractUser{" +
                "id='" + id + '\'' +
                ", createTime='" + createTime + '\'' +
                ", updateTime='" + updateTime + '\'' +
                ", name='" + name + '\'' +
                ", password='" + password + '\'' +
                ", identity='" + identity + '\'' +
                '}';
    }
}
